using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;

using FCNS.Utility;

using FCNS.KeepMoney.Configuration;
using FCNS.KeepMoney.Util;
using FCNS.KeepMoney.UI;

namespace FCNS.KeepMoney.Forms
{
    public partial class AboutForm : ParentForm
	{
		public AboutForm()
		{
			InitializeComponent();

            Program.Translation.ApplyTo(this);
            SetControlLocation(new Control[] {labelWebSite,labelAcknowledgements,labelLicense,labelDonate });
		}

		private void OnFormLoad(object sender, EventArgs e)
		{
            string strTitle = AppDefines.fullName;
            string strDesc = this.ProductVersion;

			BannerFactory.CreateBannerEx(this, m_bannerImage,Properties.Resources.rmb1_32,
				strTitle, strDesc);
		}
        
		private void OnLinkHomepage(object sender, LinkLabelLinkClickedEventArgs e)
		{
            AppDefines.WebSite.Show(string.Empty);
			this.Close();
		}

		private void OnLinkLicenseFile(object sender, LinkLabelLinkClickedEventArgs e)
		{
            //System.Diagnostics.Process.Start(AppDefines.WebSite.Show(AppDefines.WebSite.l);
			this.Close();
		}

		private void OnLinkAcknowledgements(object sender, LinkLabelLinkClickedEventArgs e)
		{
            System.Diagnostics.Process.Start(AppDefines.Acknowledgements);
			this.Close();
		}

		private void OnLinkDonate(object sender, LinkLabelLinkClickedEventArgs e)
		{
            AppDefines.WebSite.Show(AppDefines.WebSite.DonationsUrl);
			this.Close();
		}
	}
}
